package service.impl;

import java.util.List;

import dao.EmpDao;
import dao.impl.EmpDaoImpl;
import entity.Emp;
import service.EmpService;

public class EmpServiceImpl implements EmpService {
	EmpDao dao = new EmpDaoImpl();
	
	@Override
	public boolean save(Emp emp) {
		return dao.insert(emp);
	}
	@Override
	public boolean modify(Emp emp) {
		return dao.update(emp);
	}
	@Override
	public boolean remove(int empno) {
		return dao.delete(empno);
	}
	@Override
	public List<Emp> queryAll() {
		return dao.selectAll();
	}
	@Override
	public List<Emp> queryByPage(int page) {
		return dao.selectByPage(page);
	}
	@Override
	public Emp queryById(int empno) {
		return dao.selectById(empno);
	}
	@Override
	public List<Emp> queryByName(String ename) {
		return dao.selectByName(ename);
	}
}
